#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=1e5+1000;
typedef long long LL;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
LL a[maxn];
int main(void){
   cin.tie(0);std::ios::sync_with_stdio(false);
   LL t;cin>>t;
   while(t--){
       LL n,k;cin>>n>>k;
       bool flag=0;
       for(LL i=1;i<=n;i++){
           cin>>a[i];
           if(a[i]==k) flag=1,a[i]=1;
           else if(a[i]>k) a[i]=2;
           else if(a[i]<k) a[i]=0;
       }
       if(flag==0){cout<<"no"<<"\n";continue;}
       if(n==1){
          cout<<"yes"<<"\n";
       }
       else if(n==2){
          if(a[1]&&a[2]){
             cout<<"yes"<<"\n";
          }
          else{
             cout<<"no"<<"\n";
          }
       }
       else{
          bool ok=0;
          for(LL i=1;i<=n;i++){
              for(LL j=i+1;j<=i+2;j++){
                  if(j>n) continue;
                  if(a[i]&&a[j]){
                     ok=1;
                  }
              }
          }
          if(ok){
             cout<<"yes"<<"\n";
          }
          else cout<<"no"<<"\n";
       }
   }
   return 0;
}
